using System;
using System.Threading.Tasks;
using JlPay.Sdk.Core;
using JlPay.Sdk.Models.Merchant;

namespace JlPay.Sdk.Services
{
    /// <summary>
    /// 商户服务类
    /// </summary>
    public class MerchantService : BaseService
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="config">配置对象</param>
        public MerchantService(Config config) : base(config)
        {
        }

        /// <summary>
        /// 商户进件接口
        /// </summary>
        /// <param name="request">请求对象</param>
        /// <returns>响应对象</returns>
        public async Task<MerchantIncomingAddResponse> MerchantIncomingAddAsync(MerchantIncomingAddRequest request)
        {
            return await PostAsync<MerchantIncomingAddRequest, MerchantIncomingAddResponse>(request, MerchantIncomingAddRequest.API_URL);
        }

        /// <summary>
        /// 进件修改接口
        /// </summary>
        /// <param name="request">请求对象</param>
        /// <returns>响应对象</returns>
        public async Task<MerchantIncomingModifyResponse> MerchantIncomingModifyAsync(MerchantIncomingModifyRequest request)
        {
            return await PostAsync<MerchantIncomingModifyRequest, MerchantIncomingModifyResponse>(request, MerchantIncomingModifyRequest.API_URL);
        }
    }
} 